<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title></title>
  <style>
    #container {
      width: 1000px;
      height: 500px;
      margin: 50px auto;
      padding: 10px;
      background-color: rgb(232, 226, 226);
      box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); 
      display: flex;
      justify-content: center;
      align-items: center;
    }
    #ad {
      width: 520px;
      height: 280px;
      position: relative;
    }
    #closeBtn {
      position: absolute;
      top: -15px;
      right: -15px;
      width: 30px;
      height: 30px;
      background-color: #fff;
      color: #333;
      border-radius: 50%;
      text-align: center;
      line-height: 30px;
      font-size: 18px;
      font-weight: bold;
      cursor: pointer;
    }

    #closeBtn:hover {
      background-color: #f66;
      color: white;
    }
    #ad img {
      width: 100%;
      height: 100%;
      display: block;
    }
  </style>
</head>
<body>

<div id="container">
  <div id="ad">
    <div id="closeBtn">×</div>
    <img src="./img/tb.jpg" alt="广告图">
  </div>
</div>

<script>
    document.getElementById("closeBtn").onclick = function () {
    document.getElementById("ad").style.display = "none";
    document.getElementById("container").style.boxShadow = "none";
  };
</script>

</body>
</html>
